import { UPDATE_COUNT } from '../constant/index.js'

export default function CounterReducer(state = 0, action) {
  switch (action.type) {
    case UPDATE_COUNT:
      return state + action.payload
    default:
      return state
  }
}
